package com.zzyl.mapper;

import com.zzyl.dto.NursingPlanUpdateDto;
import com.zzyl.dto.ProjectPlanRequestDto;
import com.zzyl.vo.NursingPlanVo;
import com.zzyl.vo.NursingPlanVo2;
import com.zzyl.vo.NursingPlanVo3;
import com.zzyl.vo.ProjectPlanVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NursingPlanMapper {
    @Select("select * from nursing_plan")
    List<NursingPlanVo2> getAllPlan();


    void addNursingPlan(ProjectPlanRequestDto projectPlanRequestDto);

    List<NursingPlanVo3> selectByPagePlan(String name, Integer status);

    NursingPlanVo getById(Long id);

    void updateNursingPlan(NursingPlanUpdateDto nursingPlanUpdateDto);

    @Delete("delete from nursing_plan where id = #{id}")
    void deleteById(Long id);

    void ooo(Long id, Integer status);

    @Select("select count(*) from nursing_plan where plan_name = #{planName} and id != #{id}")
    int uuuu(Long id);
}
